<?php
session_start();
include_once '../funcao/util.php';
exipararSessao();
if(checarUsuario(0)){
	include_once '../config/conexao.php';
	?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Blog php -ADM</title>
<link rel="stylesheet" href="../css/bootstrap.css" />
<link rel="stylesheet" href="../css/adm.css" />
<link rel="stylesheet" href="../cleditor/jquery.cleditor.css" />
<script type="text/javascript" src="../js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/index.js"></script>
<script type="text/javascript" src="../cleditor/jquery.cleditor.min.js"></script>
</head>
<body>
	<div class="container-fluid">
	<?php include_once 'header.php';?>
	<?php include_once 'menu.php';?>
		<div class="row">
			<div class="col-lg-12">
				<div class="conteudo">
				<?php
				include_once '../msg.php';
				$page = $_GET ['pag'];
				if (file_exists ( 'view/' . $page . '.phtml' )) {
					include_once 'view/' . $page . '.phtml';
				}else{
					include_once 'view/noticias.phtml';
				}
				?>
				</div>
			</div>
		</div>
		<div class="row footer">
			<div class="col-lg-12">
				<p class="text-center">Desenvolvido por @antonioAllan e
					@jonataAlmeida</p>
			</div>
		</div>
	</div>
</body>
</html>
				<?php }else{
					$_SESSION["msg_info"] = "Usuário não está logado ou não tem autorização para acessar este ambiente.";
					header('location: ../index.php');
}

